package com.controller;


import org.apache.http.HttpResponse;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

/**
 * @auther btw
 */
@RestController
public class OrderController
{
    @Value("${server.port}")
    private String port;


    private static final int TOTAL_REQUESTS = 10000;
    private static final int BATCH_SIZE = 100;
    private static final int TIMEOUT_MS = 10000;
    private static final AtomicInteger completedRequests = new AtomicInteger(0);

    @RequestMapping("/say-hello/{name}")
    public String helloDocker(@PathVariable String name) {
        String s = "宋富强\n" +
                "霍宇桐\n" +
                "王福如\n" +
                "王博源\n" +
                "任怡帆\n" +
                "王奕霖\n" +
                "张静怡\n" +
                "秦宇鑫\n" +
                "王梦瑶\n" +
                "雷林泽\n" +
                "相佳乐\n" +
                "彭文萍";
        if(s.contains(name)){
            return "hello" + name;
        }
        return "我不认识你，请不要和我说话（高冷   (-_-^)）";
    }


}